from fastapi import APIRouter, Depends

from forward.api.admin.schemas.lucky.draw import DrawAddInSchema, DrawDeleteInSchema, DrawDetailInSchema, DrawEditInSchema, DrawListInSchema, DrawStatusInSchema
from forward.api.admin.service.lucky.draw import DrawService

draw = APIRouter(prefix="/draw")


@draw.post("/lists")
async def list(list_in: DrawListInSchema, draw_service: DrawService = Depends()):
    return await draw_service.lists(list_in)


@draw.post("/add")
async def add(add_in: DrawAddInSchema, draw_service: DrawService = Depends()):
    return await draw_service.add(add_in)


@draw.post("/delete")
async def delete(delete_in: DrawDeleteInSchema, draw_service: DrawService = Depends()):
    return await draw_service.delete(delete_in)


@draw.post("/detail")
async def detail(detail_in: DrawDetailInSchema, draw_service: DrawService = Depends()):
    return await draw_service.detail(detail_in)


@draw.post("/edit")
async def edit(edit_in: DrawEditInSchema, draw_service: DrawService = Depends()):
    return await draw_service.edit(edit_in)


@draw.post("/status")
async def status(status_in: DrawStatusInSchema, draw_service: DrawService = Depends()):
    return await draw_service.status(status_in)
